package com.ojoin.trade.t0loan_core.web.service;

import java.util.List;

import org.springframework.data.domain.Pageable;

import com.ojoin.trade.common.exception.BusinessException;
import com.ojoin.trade.common.web.service.BaseService;
import com.ojoin.trade.t0loan_core.web.domain.TbPosTranscationLog;

/**
 * Pos机交易明细记录服务接口
 * @author guoting
 *
 */
public interface PosTranscationLogBaseService extends BaseService<TbPosTranscationLog> {
	
	/**
	 * 查询当日指定支付商户未申请T+1贷款的Pos机交易明细记录 (T0000007)
	 * @param joinuserid 九盈用户id
	 * @param transdate 查询交易日期
	 * 
	 * 说明：
	 * 查询tb_pos_transcation_log表中交易时间为当日
	 * 且不在tb_t0_status_of_pos_transcation_id表中used_by_loan为Y的记录
	 * 中的支付商户Pos机交易明细记录，记录业务日志
	 * 
	 * @return 
	 * @throws BusinessException
	 */
	public List<TbPosTranscationLog> queryAllNoT1LoanPosTransInfoListByPayUserID(int joinuserid, String transdate) throws BusinessException;
	
	/**
	 * 查询当日指定支付商户未申请T+1贷款的Pos机交易明细合计值记录 
	 */
	public TbPosTranscationLog queryT1LoanPosTransInfoSumByPayUserID(int joinuserid, String transdate) throws BusinessException;
	
	/**
	 * 查询指定商户申请T+0贷款审核通过的九盈用户的当日前30日历史交易列表(T00000026)
	 * @return
	 * @throws BusinessException
	 */
	public List<TbPosTranscationLog> queryT0LoanLiveUserHistoryPosTransListByMhtNo(String mhtno, Pageable page)
			throws BusinessException;

	public void deleteByIdInBatch(Integer joinuserid, String transdate) throws BusinessException;
}
